package cn.wolfcode.mapper;

import cn.wolfcode.domain.Permission;
import cn.wolfcode.result.QueryObject;

import java.util.List;

/**
 * @Description: 权限持久层
 * @Author: 伍家钰
 * @Date: 2020/7/12 0:52
 * @Version: 1.0
 */
public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    List<String> selectAllExpression();

    int updateByPrimaryKey(Permission record);

    int selectCount(QueryObject qo);

    List<Permission> selectForList(QueryObject qo);

    /**
     * 查询登入用户的全部权限
     *
     * @param id:用户对应的角色id
     * @return : 返回权限
     */
    List<String> selectForExpression(Long id);

    List<String> selectPermissionByEmployeeId(Long id);
}